import http from "@/utils/http2.js";

/**
 * 删除订单
 * @param {*} data
 * @returns
 */
async function deleteOrder(data) {
  let res = await http.delete("auction-order/api/deleteOrder", data);
  return res;
}

/**
 * 获取订单列表
 * @param {*} data
 * @returns
 */
async function getOrder(data) {
  let res = await http.post("auction-order/api/getOrders", data);
  return res;
}

/**
 * 修改订单
 * @param {*} data
 * @returns
 */
async function updateOrder(data) {
  let res = await http.put("auction-order/api/updateOrder", data);
  return res;
}

/**
 * 创建订单
 * @param {*} data
 * @returns
 */
async function saveOrder(data) {
  let res = await http.post("auction-order/api/addOrder", data);
  return res;
}

export { deleteOrder, getOrder, updateOrder, saveOrder };
